package com.gutsyzhan.dynamicdatasourcespringbootstarter.properties;

import com.gutsyzhan.dynamicdatasourcespringbootstarter.config.DruidConfig;
import lombok.Data;
import org.springframework.boot.context.properties.NestedConfigurationProperty;

import javax.sql.DataSource;

/**
 * 数据源属性，参照原生JDBC实现
 */
@Data
public class DataSourceProperty {
    /**
     * 连接池类型
     */
    private Class<? extends DataSource> type;
    /**
     * driver
     */
    private String driverClassName;
    /**
     * url
     */
    private String url;
    /**
     * username
     */
    private String username;
    /**
     * password
     */
    private String password;

    /**
     * 用私钥进行解密
     */
    private String privateKey;

    @NestedConfigurationProperty
    private DruidConfig druidConfig;
}
